-- GENERATED SPELL FOR [Enraged Fire Spirit] --


function spell0_21061(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21061', 622, 1)
end

function spell1_21061(pUnit, Event) --@Fel Fire Aura,Self--
pUnit:FullCastSpellOnTarget(36006,pUnit)
pUnit:RegisterEvent('Sorts_21061', 601, 1)
end

function spell2_21061(pUnit, Event) --@Fel Fireball,n/a--
pUnit:FullCastSpellOnTarget(36247,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21061', 3000, 1)
end

function Sorts_21061(pUnit, Event)
local choix_sorts_21061 = math.random(0, 2)
if choix_sorts_21061 == 0 then
pUnit:RegisterEvent('spell0_21061', 1, 1)
end
if choix_sorts_21061 == 1 then
pUnit:RegisterEvent('spell1_21061', 1, 1)
end
if choix_sorts_21061 == 2 then
pUnit:RegisterEvent('spell2_21061', 1, 1)
end
end

function mob21061_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21061', math.random(1500, 3000), 1)
end

function mob21061_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21061_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21061_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21061, 1, 'mob21061_Action')
RegisterUnitEvent(21061, 2, 'mob21061_Leave')
RegisterUnitEvent(21061, 3, 'mob21061_Kill')
RegisterUnitEvent(21061, 4, 'mob21061_Die')
